import type { DropMenu } from '../components/Dropdown';
import type { LocaleSetting, LocaleType } from '/#/config';

export const LOCALE: { [key: string]: LocaleType } = {
  ZH_CN: 'zh_CN',
  EN_US: 'en',
  ZH_TW: 'zh_TW',
  VI_VN: 'vi',
  RU_RU: 'ru',
  TH_TH: 'th_TH',
};

export const localeSetting: LocaleSetting = {
  showPicker: true,
  // 当前语言
  locale: LOCALE.ZH_CN,
  // 默认语言
  fallback: LOCALE.ZH_CN,
  // 允许的语言
  availableLocales: [
    LOCALE.ZH_CN,
    LOCALE.EN_US,
    LOCALE.ZH_TW,
    LOCALE.VI_VN,
    LOCALE.RU_RU,
    LOCALE.TH_TH,
  ],
};

// 语言列表
export const localeList: DropMenu[] = [
  {
    text: '简体中文',
    event: LOCALE.ZH_CN,
  },
  {
    text: 'English',
    event: LOCALE.EN_US,
  },
  {
    text: '繁體中文',
    event: LOCALE.ZH_TW,
  },
  {
    text: 'Tiếng Việt',
    event: LOCALE.VI_VN,
  },
  {
    text: 'Русский',
    event: LOCALE.RU_RU,
  },
  {
    text: 'ไทย',
    event: LOCALE.TH_TH,
  },
];

// 谷歌翻译api
export const googleTranslateList: DropMenu[] = [
  {
    text: '中文简体',
    event: 'zh-CN',
  },
  {
    text: '英文',
    event: 'en',
  },
  {
    text: '中文繁体',
    event: 'zh-TW',
  },
  {
    text: '越南语',
    event: 'my',
  },
  {
    text: '俄语',
    event: 'ru',
  },
  {
    text: '泰语',
    event: 'th',
  },
];
